Closed
Conversation
mostly `async`/`await` and revisiting module-level utility functions
FND
commented
Mar 6, 2025
Comment on lines
+5
to
6
| constructor(directory, { skipDotfiles, filter } = {}) { | ||
| this.directory = directory; |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| constructor(directory, { skipDotfiles, filter } = {}) { | |
| this.directory = directory; | |
| constructor(root, { skipDotfiles, filter } = {}) { | |
| this._root = root; |
It doesn't look like the directory property is used by anyone; I've checked faucet-static and faucet-images.
| match(filepaths) { | ||
| return filesWithinDirectory(this.directory, filepaths). | ||
| then(filepaths => filepaths.filter(this.filter)); | ||
| async match(filepaths) { |
Contributor
Author
There was a problem hiding this comment.
async isn't actually required by the implementation nor by downstream (i.e. faucet-static and faucet-images), but current tests demand it...
... except if the filter option is async, so I guess it's best to leave this as is, if only because it allows for more flexibility.
Merged
7 tasks
Member
|
Thanks for your work on this, it has been completely merged into faucet-pipeline/faucet-pipeline-static#71 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not sure it's wise to touch any of this without any tangible benefit - not least because I'm not sure test coverage is sufficient to provide confidence.
In my defense, it started as an effort to replace the obsolete
flattenutility...